# Edit the following lines to meet your needs

# Compiler to use
CPP = g++
#CPP = pgcpp
#CPP_FLAGS = -Wpadded -Wpacked -malign-double -mpreferred-stack-boundary=8

F   = f95
F_FLAGS = -lc -lstdc++ -ffree-form
#F   = pgf95
#F_FLAGS = -pgcpplibs
OUTPUT = ftest

#----------------------------------------------------------------------- 
#Main-Target
all:		MD5 FORT

#----------------------------------------------------------------------- 
#all header-files

		
HEADER = 	hl_hashwrapper.h \
		hl_exception.h \
		hl_md5.h hl_md5wrapper.h \
		hl_types.h \
		hashlibpp.h
		
#----------------------------------------------------------------------- 
# MD5 Targets

MD5_CPP =	hl_md5.cpp \
		hl_md5wrapper.cpp \
		md5.cpp

MD5:		md5.o

md5.o:		md5.cpp hl_md5.cpp hl_md5wrapper.cpp
		$(CPP) $(CPP_FLAGS) -c $(MD5_CPP)

#----------------------------------------------------------------------- 
# Fortran Targets

O_FILES = 	hl_md5.o \
		hl_md5wrapper.o \
		md5.o \
                test.o

FORT:           test.o $(OUTPUT)

test.o:		test.f90
		$(F) -c test.f90

$(OUTPUT):	test.f90 $(O_FILES)
		$(F) -o $(OUTPUT) ${F_FLAGS} $(O_FILES)


#----------------------------------------------------------------------- 
# Cleaning object-files

clean:
		rm *.o
		-@ echo "cleaned up "
		-@ echo ""

#----------------------------------------------------------------------- 
#EOF
